home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 26
/
Cream of the Crop 26.iso
/
program
/
ddj0897.zip
/
DYN401.ZIP
/
examples
/
exam36
/
main.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-09-27
|
1KB
|
82 lines
/*
*
* This source code is CONFIDENTIAL and
* PROPRIETARY to Algorithms Corporation. Unauthorized
* distribution, adaptation or use may
* be subject to civil and criminal penalties.
*
* Copyright (c) 1993 Algorithms Corporation
* 3020 Liberty Hills Drive
* Franklin, TN 37064
*
* ALL RIGHTS RESERVED.
*
*
*
*/
#include "generics.h"
void fun(int);
main(int argc, char *argv[])
{
int m=1, i;
InitDynace(&argc);
if (argc > 1)
m = atoi(argv[1]);
for (i=0 ; i++ < m ; )
fun(i);
return 0;
}
void fun(int i)
{
object x;
#if 1
x = StackAlloc(ShortInteger); /* stack allocation */
#else
x = gAlloc(ShortInteger); /* heap allocation */
#endif
gChangeShortValue(x, i);
gPrint(x, stdoutStream);
}
/*
*
* This source code is CONFIDENTIAL and
* PROPRIETARY to Algorithms Corporation. Unauthorized
* distribution, adaptation or use may
* be subject to civil and criminal penalties.
*
* Copyright (c) 1993 Algorithms Corporation
* 3020 Liberty Hills Drive
* Franklin, TN 37064
*
* ALL RIGHTS RESERVED.
*
*
*
*/